package YAPserver.behaviours;

import YAPserver.gameObjects.AbstractBall;
import YAPserver.gameObjects.GameBall;
import YAPserver.gameObjects.Mod;
import YAPserver.logic.Output;
import YAPserver.logic.Player;

/**
 * This class tells the player how to respond when there is a collision typically between a wall and an ballAbstract.
 * @author Daniel
 *
 */
public class CollideWall implements CollideBehaviour{

	@Override
	public void collide(Player player, AbstractBall ball, Output out) {
		if(ball instanceof GameBall){
			player.subtractLife();
			((GameBall) ball).setOnField(false);
		}
		if(ball instanceof Mod){
			//Do nothing
		}
	}

}
